/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_account_detail")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AccountDetail extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer receiveId; // 实收单编号
	private Integer supplierId; // 供货商ID
	private Integer paidOwner; // 付款人
	private String paidDate; // 付款日期
	private Integer needPaid; // 应付金额
	private Integer receivePaid; // 实收金额
	private String remark; // 备注

    
	  public Integer getReceiveId() {
        return receiveId;
      }
      
      public void setReceiveId(Integer receiveId) {
        this.receiveId = receiveId;
      }
    
	  public Integer getSupplierId() {
        return supplierId;
      }
      
      public void setSupplierId(Integer supplierId) {
        this.supplierId = supplierId;
      }
    
	  public Integer getPaidOwner() {
        return paidOwner;
      }
      
      public void setPaidOwner(Integer paidOwner) {
        this.paidOwner = paidOwner;
      }
    
	  public String getPaidDate() {
        return paidDate;
      }
      
      public void setPaidDate(String paidDate) {
        this.paidDate = paidDate;
      }
    
	  public Integer getNeedPaid() {
        return needPaid;
      }
      
      public void setNeedPaid(Integer needPaid) {
        this.needPaid = needPaid;
      }
    
	  public Integer getReceivePaid() {
        return receivePaid;
      }
      
      public void setReceivePaid(Integer receivePaid) {
        this.receivePaid = receivePaid;
      }
    
	  public String getRemark() {
        return remark;
      }
      
      public void setRemark(String remark) {
        this.remark = remark;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
